<template>
  <el-dialog v-model="visible" title="联系方式" :close-on-click-modal="false" :close-on-press-escape="false"
    style="width: 20%;top:20%;">
    <el-text >联系方式：{{ contactInfo }}</el-text>
    <template v-slot:footer>
      <el-button  style="background: rgba(22, 119, 255, 1);color: #fff;border-radius: 5px;"  @click="visible = false">确定</el-button>
    </template>
  </el-dialog>
</template>

<script lang="ts" setup>
import { reactive, ref, watch } from "vue";
import baseService from "@/service/baseService";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const emit = defineEmits(["refreshDataList"]);
const visible = ref(false);
const contactInfo = ref("");


const init = (id?: number) => {
  visible.value = true;
  contactInfo.value = "";
  getContactInfo(id)
};

const getContactInfo = (id?: number) => {
    const data = { id : id }
    baseService.post("/noc/consultationlead/info", data).then((res) => {
      console.log(res.data)
      contactInfo.value = res.data.contactInfo;
    });
};

defineExpose({
  init
});
</script>

